package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ApplicationAccessMapper;
import com.ruoyi.system.domain.ApplicationAccess;
import com.ruoyi.system.service.IApplicationAccessService;

/**
 * 应用接入Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-05
 */
@Service
public class ApplicationAccessServiceImpl implements IApplicationAccessService 
{
    @Autowired
    private ApplicationAccessMapper applicationAccessMapper;

    /**
     * 查询应用接入
     * 
     * @param id 应用接入主键
     * @return 应用接入
     */
    @Override
    public ApplicationAccess selectApplicationAccessById(Long id)
    {
        return applicationAccessMapper.selectApplicationAccessById(id);
    }

    /**
     * 查询应用接入列表
     * 
     * @param applicationAccess 应用接入
     * @return 应用接入
     */
    @Override
    public List<ApplicationAccess> selectApplicationAccessList(ApplicationAccess applicationAccess)
    {
        return applicationAccessMapper.selectApplicationAccessList(applicationAccess);
    }

    /**
     * 新增应用接入
     * 
     * @param applicationAccess 应用接入
     * @return 结果
     */
    @Override
    public int insertApplicationAccess(ApplicationAccess applicationAccess)
    {
        applicationAccess.setCreateTime(DateUtils.getNowDate());
        return applicationAccessMapper.insertApplicationAccess(applicationAccess);
    }

    /**
     * 修改应用接入
     * 
     * @param applicationAccess 应用接入
     * @return 结果
     */
    @Override
    public int updateApplicationAccess(ApplicationAccess applicationAccess)
    {
        return applicationAccessMapper.updateApplicationAccess(applicationAccess);
    }

    /**
     * 批量删除应用接入
     * 
     * @param ids 需要删除的应用接入主键
     * @return 结果
     */
    @Override
    public int deleteApplicationAccessByIds(Long[] ids)
    {
        return applicationAccessMapper.deleteApplicationAccessByIds(ids);
    }

    /**
     * 删除应用接入信息
     * 
     * @param id 应用接入主键
     * @return 结果
     */
    @Override
    public int deleteApplicationAccessById(Long id)
    {
        return applicationAccessMapper.deleteApplicationAccessById(id);
    }
}
